package com.erp.cloudfi.org.profitcenter.model;

import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

@Getter
@AllArgsConstructor
public enum StoreOpenStatusEnum {
  temp(1, "临时有效"),
  open(2, "有效"),
  close(3, "过期");

  private Integer code;
  private String desc;

  public static Map<Integer, StoreOpenStatusEnum> asMap() {
    Map<Integer, StoreOpenStatusEnum> map = Maps.newHashMap();
    StoreOpenStatusEnum[] values = values();
    for (StoreOpenStatusEnum value : values) {
      map.put(value.getCode(), value);
    }
    return map;
  }
}
